In [10]:
%matplotlib inline

In [11]:
cd ~/workspace/NetworKit/benchmark/


/Users/cls/workspace/NetworKit/benchmark

In [12]:
from Benchmark import *

Settings


In [12]:


In [13]:
allGraphs = ["PGPgiantcompo", "power", "caidaRouterLevel"]

In [49]:
from scipy import stats
d1 = stats.norm(0, 5).rvs(100)
d2 = numpy.concatenate([stats.gamma(4).rvs(50),
                     -1 * stats.gamma(4).rvs(50)])
d3 = numpy.concatenate([stats.gamma(4).rvs(50),
                     -1 * stats.gamma(4).rvs(50)])
data = pandas.DataFrame(dict(d1=d1, d2=d2, d3=d3, d4=d3, d5=d3, d6=d3))

In [65]:
seaborn.boxplot(data, linewidth=1.5, widths=.25, color=seaborn.xkcd_rgb["red orange"], vert=False);



In [57]:
seaborn.boxplot?

Graph Metadata


In [14]:
graphMeta(allGraphs, graphDir="/Users/cls/workspace/Data/NwkBenchmark/")


Out[14]:
name n m
0 PGPgiantcompo 10680 24316
1 power 4941 6594
2 caidaRouterLevel 192244 609066

NetworKit Benchmark


In [15]:
#bench = Bench()

In [16]:
nkdata = {}

Connected Components


In [17]:
%time nkdata["ConnectedComponents"] = algoBenchmark(nk.bConnectedComponents(), allGraphs)


benchmarking ConnectedComponents
loading PGPgiantcompo
loading power
loading caidaRouterLevel
CPU times: user 1.73 s, sys: 76.1 ms, total: 1.81 s
Wall time: 1.82 s

In [18]:
timePlot(nkdata["ConnectedComponents"])



In [19]:
%time nkdata["ParallelConnectedComponents"] = algoBenchmark(nk.bParallelConnectedComponents(), allGraphs)


benchmarking ParallelConnectedComponents
loading PGPgiantcompo
loading power
loading caidaRouterLevel
CPU times: user 1.84 s, sys: 73 ms, total: 1.91 s
Wall time: 1.55 s

In [20]:
timePlot(averageRuns(nkdata["ParallelConnectedComponents"]))


Core Decomposition

Degree Distribution Analysis

Degree Assortativity

BFS

Community Detection

Diameter


In [21]:
%time nkdata["Diameter"] = algoBenchmark(nk.bDiameter(), ["PGPgiantcompo", "power", "caidaRouterLevel"]))


  File "<unknown>", line 1
    nkdata["Diameter"] = algoBenchmark(nk.bDiameter(), ["PGPgiantcompo", "power", "caidaRouterLevel"]))
                                                                                                      ^
SyntaxError: invalid syntax

In [ ]:
timePlot(averageRuns(nkdata["Diameter"]))

Clustering Coefficients

Centrality

Betweenness


In [ ]:
#data["Betweenness"] = averageRuns(benchmark(nk.bBetweenness(), ["power"]))

In [ ]:
#timePlot(data["Betweenness"])

In [ ]:
#saveData(pandas.DataFrame(nkdata["ConnectedComponents"]), "nkdata")

NetworkX Benchmark


In [ ]:
nxdata = {}

In [ ]:
%time nxdata["ConnectedComponents"] = benchmark(nx.bConnectedComponents(), allGraphs)

In [ ]:
timePlot(averageRuns(nxdata["ConnectedComponents"]))

igraph Benchmark

Comparison


In [ ]: